
//---------------------------------------------------------------------------
#ifndef PG2_RENDERER_H
#define PG2_RENDERER_H
//---------------------------------------------------------------------------
#include "pg2_api.h"
//---------------------------------------------------------------------------
#include "rendering/pg2_rendertypes.h"
//---------------------------------------------------------------------------
struct IDirect3D9;
struct IDirect3DDevice9;
//---------------------------------------------------------------------------
namespace pg2
{
//---------------------------------------------------------------------------
template<typename T>
class VertexBuffer;
//---------------------------------------------------------------------------
class PG2_API Renderer
{
// initialization
public:
	Renderer ();
	~Renderer ();

	bool init (HWND hWnd);


// rendering
public:
	void beginFrame ();
	void endFrame ();

private:
	IDirect3D9* m_pkD3D;
	IDirect3DDevice9* m_pkDevice;


// vertex buffers
public:
	void draw (const ColorVertex* pakVertexCollection, Primitive ePrim, unsigned int uiVertexCount);

private:
	VertexBuffer<ColorVertex>* m_pkColorVB;
};
//---------------------------------------------------------------------------
} // end namespace
//---------------------------------------------------------------------------
#endif // PG2_RENDERER_H
//---------------------------------------------------------------------------
